   #!/usr/bin/perl
    use strict;
    use warnings;

    my @people = (
        { name => 'Becky', age => 23},
        { name => 'Simon', age => 43},
        { name => 'Bianca', age => 29},
        { name => 'Steven', age => 23},
        { name => 'Greg', age => 50},
        { name => 'Andrew', age => 19},
    );

    foreach my $person (sort {$a->{age} cmp $b->{age}} @people) {
        print $person->{name} . " is " . $person->{age} . "\n";
    }